package com.baor.controller;

import com.baor.service.DeliveryRankingService;
import com.baor.service.DeliveryRecordService2;
import com.baor.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping(value = "delivery")
public class DeliveryRecordController {

    @Autowired
    private DeliveryRecordService2 deliveryRecordService2;

    @Autowired
    private DeliveryRankingService deliveryRankingService;


    @RequestMapping(value = "record", method = RequestMethod.GET)
    public R record(@RequestParam Map<String, Object> params) {
        return deliveryRecordService2.DeliveryRecord2(params);
    }

    @RequestMapping(value = "record2")
    public R record2(@RequestBody Map<String,Object> params) {
        return deliveryRecordService2.DeliveryRecord(params);
    }

    @RequestMapping(value = "map")
    public R map(Map<String , Object> params){
        return deliveryRecordService2.DeliveryMap(params);
    }

    @RequestMapping(value = "deliveryRanking")
    public R deliveryRanking(@RequestBody Map<String,Object> params){
        return deliveryRankingService.deliveryRecord(params);
    }

    @RequestMapping(value = "myRankingNums")
    public R MyRankingNums( Map<String,Object> params){
        return deliveryRankingService.MyRankingNums(params);
    }
    @RequestMapping(value = "myRankingWeight")
    public R MyRankingWeight(Map<String,Object> params){
        return deliveryRankingService.MyRankingWeight(params);
    }
}
